﻿@model HomeCareLibrary.Models.UserDetailIDModel




<div class="col-lg-9 col-sm-9 right_part">
    <div class="personalization-page admin-monthly-alertPage">
        <div class="flipbox-container box100">
            <div id="flipbox" class="flipbox">


                @*Header not show in case of Android App. *@
                @if (Session[HomeCareLibrary.Constants.SessionConstants.MODE] == null || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPHONE_APP || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPAD_APP)
                {
                    <div class="title clearfix">
                        <h1 style="text-transform: none;">Monthly Reminder</h1>
                        <div class="top-btn-per clearfix">
                            <div class="back-button" id="back-button">
                                <a href="javascript:void(0);">
                                    <img src="@Url.Content("~/images/personalization-images/back-btn.png")" alt="back-btn" class="back-btn">
                                    <div class="back-mob-btn"><span class="glyphicon glyphicon-chevron-left"></span>Back</div>
                                </a>
                            </div>

                        </div>
                    </div>
                }
                @{
                  var sessionValue = "";
                  if (Session[HomeCareLibrary.Constants.SessionConstants.MODE]!=null)
                  {
                      sessionValue = Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString();
                  }
                  else{
                      sessionValue = "";
                  }
                      <input type="hidden" value="@sessionValue" id="hdnSessionValue" />
              }

                @{var androidContent = string.Empty;
                  if (Session[HomeCareLibrary.Constants.SessionConstants.MODE] == null || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPHONE_APP || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPAD_APP)
                  {
                      androidContent = "class= personalization-content";
                  }
                  else
                  {
                      androidContent = "";
                  }
                }


                <div class="main-content">
                    <div @androidContent>
                        <div class="personalization-bg">
                            <div class="personalization-inn">
                                @using (Html.BeginForm("UpdateWebMonthlyReminder", "Admin", FormMethod.Post, new { id = "UpdateWebMonthlyReminderForm" }))
                                {
                                        
                                    @Html.HiddenFor(m => m.user_id)




                                    <div class="personalization-data monthly-alert-data full-monthly-alert">
                                        <br />
                                        <p class="top-data">You can set how and when to be notified each month when your personalized home care reminders & tips are ready.</p>
                                        <p class="top-data">You can change how and when you want to be notified.</p>

                                        @if (TempData["messageweb"] != null)
                                        {
                                            <div class="update text-center">
                                                <label class="red" style="font-weight: normal;">
                                                    @TempData["messageweb"]
                                                </label>
                                            </div>
                                        }
                                        <div class="clearfix monthly-alert-panel-outer">
                                            <div class="monthly-alert-panel clearfix">
                                                <div class="pull-left icon-left"></div>
                                                <div class="pull-left middle-txt"><span>Faceboo</span>k</div>
                                                <div class="right-img col-md-8">
                                                    <img src="@Url.Content("~/images/personalization-images/facebook-icon.png")" alt="facebook-icon">
                                                </div>
                                            </div>
                                            <div class="monthly-alert-panel clearfix">
                                                <div class="pull-left icon-left"></div>
                                                <div class="pull-left middle-txt"><span>Twitter</span></div>
                                                <div class="right-img col-md-8">
                                                    <img src="@Url.Content("~/images/personalization-images/twitter-icon.png")" alt="twitter-icon">
                                                </div>
                                            </div>
                                            <div class="monthly-alert-panel clearfix">
                                                <div class="pull-left icon-left checkboxFive">
                                                    <input type="checkbox" id="chkemail" />
                                                    @if (Session[HomeCareLibrary.Constants.SessionConstants.MODE] != null && Session[HomeCareLibrary.Constants.SessionConstants.MODE] == HomeCareLibrary.Constants.ApplicationModeConstants.ANDROID_APP)
                                                    { 
                                                        <label for="chkemail" class="homeInner"></label>
                                                    }
                                                </div>
                                                <div class="pull-left middle-txt"><span>Email</span></div>
                                                <div class="right-img col-md-8">


                                                    @Html.TextBoxFor(m => m.web_mo_alert_email, new { @class = "input-box col-md-4 form-control" })

                                                </div>
                                            </div>
                                            <div class="monthly-alert-panel clearfix">
                                                <div class="last-alert-panel clearfix">
                                                    <div class="pull-left icon-left checkboxFive">
                                                        <input type="checkbox" id="chkNoAlert" />
                                                        @if (Session[HomeCareLibrary.Constants.SessionConstants.MODE] != null && Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.ANDROID_APP)
                                                        { 
                                                            <label for="chkNoAlert" class="homeInner"></label>
                                                        }
                                                    </div>
                                                    <div class="pull-left middle-txt"><span>No alerts</span></div>
                                                    <div class="right-img col-md-8">
                                                        <p>
                                                            I will use my own calendar app to send me monthly alerts<br>
                                                            <span>(<a href="https://www.google.com/calendar" target="_blank">Google Calendar</a>, <a href="http://www.rememberthemilk.com/" target="_blank">Remember the Milk</a>, <a href="http://www.reminderfox.org/" target="_blank">Reminder Fox</a>, etc.)</span>
                                                        </p>
                                                    </div>
                                                </div>
                                            </div>

                                            <br />
                                            <div class="button">
                                                <button class="btn-per" type="submit" id="finishweb">Submit</button>
                                            </div>

                                        </div>


                                    </div>


                                    <script src="@Url.Content("~/js/admin/monthlyreminder/webmonthlyreminder.js")" type="text/javascript"></script>
                                }

                                @if (Session[HomeCareLibrary.Constants.SessionConstants.MODE] != null)
                                {
                                    if (Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.ANDROID_APP || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPHONE_APP || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPAD_APP)
                                    {
                                        using (Html.BeginForm("UpdateAndroidMonthlyReminder", "Admin", FormMethod.Post, new { id = "UpdateAndroidMonthlyReminderForm" }))
                                        {
                                   
                                    @Html.HiddenFor(m => m.user_id)
                                                                           
                                    @Html.HiddenFor(m => m.app_mo_alert_badge)
                                    @Html.HiddenFor(m => m.app_mo_alert_popup)
                                    @Html.HiddenFor(m => m.app_mo_alert_week)
                                    @Html.HiddenFor(m => m.app_mo_alert_day)
                                    @Html.HiddenFor(m => m.app_mo_alert_hour)
                                   
                                    <div class="personalization-data admin-monthly-alert mobile-monthly-alert">

                                        <br />
                                        <p class="txt">Your personalized home care tasks & tips
are calculated each month for you. </p>
<p class="top-data">When do you want your monthly reminder?</p>



                                        @if (TempData["messageandroid"] != null)
                                        {
                                            <div class="update text-center">
                                                <label class="red" style="font-weight: normal;">
                                                    @TempData["messageandroid"]
                                                </label>
                                            </div>
                                        }

                                        <div class="Dwelling-part">
                                            <div class="form-per">
                                                <form role="form">
                                                    <div class="form-checkbox">
                                                        <div class="checkbox +">
                                                            <input type="checkbox" id="chkMob_BadgeAlert_WebView" name="">
                                                            <label for="chkMob_BadgeAlert_WebView"></label>
                                                            <span>Badge</span>
                                                        </div>
                                                        <div class="checkbox checkboxHalf">

                                                            <input type="checkbox" id="chkMob_PopupAlert_WebView">
                                                            <label for="chkMob_PopupAlert_WebView"></label>
                                                            <span>
                                                                @if (Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPHONE_APP || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPAD_APP)
                                                                {
                                                                    @Html.DisplayName("Notification Center")
                                                                }
                                                                else
                                                                {
                                                                    @Html.DisplayName("Alert")
                                                                }
                                                            </span>
                                                        </div>

                                                        @if (!String.IsNullOrEmpty(Model.web_mo_alert_email))
                                                        {
                                                            <div class="checkbox checkbox-email" style="display: none;">
                                                                <label>
                                                                    <input type="checkbox" id="chkweb_mo_alert_email">
                                                                    Email</label>

                                                                @Html.TextBoxFor(m => m.web_mo_alert_email, new { @id = "moweb_mo_alert_email", @class = "form-control" })
                                                            </div>
                                                        }
                                                    </div>
                                                    <div class="form-group">

                                                        <br />

                                                        @Html.DropDownList("getWeekoftheMonth", null, new { @class = "form-control", @id = "getWeekoftheMonth_WebView" })
                                                    </div>
                                                    <div class="form-group">

                                                        <br />
                                                        @Html.DropDownList("getDayoftheWeek", null, new { @class = "form-control", @id = "getDayoftheWeek_WebView" })
                                                    </div>
                                                    <div class="form-group">

                                                        <br />
                                                        @Html.DropDownList("getTimeoftheDay", null, new { @class = "form-control", @id = "getTimeoftheDay_WebView" })
                                                    </div>


                                                    <br />
                                                    <div class="button smallBtn">
                                                        <button class="btn-per" type="submit" id="finishandroid">Submit</button>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>


                                        <div style="word-wrap: break-word;">

                                            <br />
                                            Session Ids with values:
                      @if (ViewBag.sessionIds != string.Empty)
                      {
                          @ViewBag.sessionIds
                      }
                                            <br />
                                            <br />

                                            <span>Session:
                    @if (ViewBag.getSession != string.Empty)
                    {
                        @ViewBag.getSession
                    }
                                            </span>

                                            <br />
                                            <br />
                                            JSON:
                   @if (ViewBag.JsonString != string.Empty)
                   {
                       <h4>@ViewBag.JsonString</h4>
                   }
                                            <br />
                                            <br />
                                            <span style="margin-left: 10px;">Request Content-Type:
                    @if (ViewBag.ContentType != string.Empty)
                    {
                        @ViewBag.ContentType
                    }
                                            </span>

                                            <br />
                                            <br />
                                            <span style="margin-left: 10px;">Request URL:
                    @if (ViewBag.Url != string.Empty)
                    {
                        @ViewBag.Url
                    }
                                            </span>
                                        </div>


                                    </div>
                                   
                                 
                                    <script src="@Url.Content("~/js/admin/monthlyreminder/androidmonthlyreminder.js")" type="text/javascript"></script>
                                        }
                                    }

                                }

                            </div>



                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@section script {

    <script type="text/javascript">

        function isValidEmailAddress(emailAddress) {
            var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
            return pattern.test(emailAddress);
        }
        
    </script>

    

    <script src="@Url.Content("~/js/iPhone/iPhone.js")"></script>


}
